﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace CRM.Api.Models.AXB
{
    /// <summary>
    /// 业务绑定
    /// </summary>
    public class BindTelModel
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="tela">真实号码</param>
        /// <param name="telb">对端号码</param>
        /// <param name="reqid">业务id</param>
        public BindTelModel(string tela, string telb, string reqid)
        {
            telA = tela;
            telB = telb;
            requestId = reqid;
            subts = DateTime.Now.ToString("yyyyMMddHHmmss");
            anucode = "1,2,3";
            expiration = "1800";  //半小时
            extra = new Extra()
            {
                calldisplay = "0,0"
            };

        }

        /// <summary>
        /// 业 务 id
        /// </summary>
        public string requestId { set; get; }

        /// <summary>
        /// 真实号码
        /// </summary>
        public string telA { set; get; }


        /// <summary>
        /// 对端号码
        /// </summary>
        public string telB { set; get; }

        /// <summary>
        /// 虚拟小号
        /// </summary>
        public string telX { set; get; }

        /// <summary>
        /// 绑定时间
        /// 格式为 yyyyMMddHHmmss。时间 采用北京时间，24 小时制。
        /// </summary>
        public string subts { set; get; }

        /// <summary>
        /// 放音编码
        /// 单位：秒， 自绑定时间开始后 expiration 秒自动解绑；0 表示 不限制时间，不会自动解绑
        /// </summary>
        public string anucode { set; get; }

        /// <summary>
        /// 过期时间
        /// </summary>
        public string expiration { set; get; }

        /// <summary>
        /// 额外控制
        /// </summary>
        public Extra extra { set; get; }
    }

    public class Extra
    {

        /// <summary>
        /// 控制显示
        /// </summary>
        public string calldisplay { set; get; }
    }
}